package ru.myrtle.umf.query.condition.object;

import ru.myrtle.umf.UObject;
import ru.myrtle.umf.query.UCondition;

public abstract class UObjectCondition extends UCondition {

    protected abstract boolean isSatisfiedImpl(UObject object);

    @Override
    public final boolean isSatisfied(Object object) {
        return object instanceof UObject && isSatisfiedImpl(
                (UObject) object
        );
    }
}
